Skip to content

[19.0][FIX] sale_management: create sections for optional products - #5975

Merged
pedrobaeza merged 1 commit into
OCA:19.0from
hbrunn:19.0-sale_management-sections
Sep 8, 2026
Merged

[19.0][FIX] sale_management: create sections for optional products#5975
pedrobaeza merged 1 commit into
OCA:19.0from
hbrunn:19.0-sale_management-sections

Conversation

@hbrunn

@hbrunn hbrunn commented Sep 8, 2026

Copy link
Copy Markdown
Member

fixes #5970

the information about a line being optional or not lives on the section coming before that line (not the is_optional field of the line itself), so we need to reorder lines and inject a new optional section for every order that has optional products.

while being on it, this fixes copying the json dict of translated sale.order.template.option#name to sale.order.template.line#name

AND res_users.partner_id=res_partner.id
AND display_type='line_section'
AND is_optional=True
AND res_partner.lang=%s

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
AND res_partner.lang=%s
AND COALESCE(res_partner.lang, 'en_US')=%s

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

[FIX] sale_management: copy translated strings correctly

fixes OCA#5970
@hbrunn
hbrunn force-pushed the 19.0-sale_management-sections branch from 9a0e854 to b1762ba Compare September 8, 2026 15:39
@pedrobaeza pedrobaeza added this to the 19.0 milestone Sep 8, 2026
@pedrobaeza
pedrobaeza merged commit 221a31f into OCA:19.0 Sep 8, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mod:openupgrade_scripts Module openupgrade_scripts series:19.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[19.0] sale_management: converted sale.order.option lines are counted in the order total

3 participants